/**
 * build_project
 * <p>
 * Copyright 2014 cayden.cn, Inc. All rights reserved.
 *
 * @author Administrator
 * @date 2021-07-08 14:39
 */
package com.cayden.componets.redis;

import com.cayden.base.utils.kryos.Kryos;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;

/**
 *
 * @author cayden
 * @date 2021-07-08 14:39
 */
public class DefaultRedisSerializer implements RedisSerializer {

    @Override
    public byte[] serialize(Object o) throws SerializationException {
        return Kryos.serialize(o);
    }

    @Override
    public Object deserialize(byte[] bytes) throws SerializationException {
        return Kryos.deserialize(bytes);
    }
}
